﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.Runtime;

namespace Dmo_lc_2.Shape
{
    public class ArcShape : BaseShape
    {
        public double[] center;
        public double[] normal;
        public double radius;
        public int weight { get; set; }
        public double startAngle;
        public double endAngle;
        public double totalAngle;

        public ArcShape(Entity in_entity, Transaction tr) : base(in_entity, tr)
        {
        }

        public override void Init() {
            shapeType = ShapeType.ARC;
            shapeTypeName = shapeType.ToString();

            Arc tempEntity = (Arc)mEntity;

            color = getColor();
            center = new double[] { tempEntity.Center.X, tempEntity.Center.Y, tempEntity.Center.Z };
            normal = new double[] { tempEntity.Normal.X, tempEntity.Normal.Y, tempEntity.Normal.Z };
            radius = (double)tempEntity.Radius;
            weight = (int)tempEntity.LineWeight;
            startAngle = (double)tempEntity.StartAngle;
            endAngle = (double)tempEntity.EndAngle;
            totalAngle = (double)tempEntity.TotalAngle;
        }
    }
}